/**
 * Created by Baggio on 2018-12-6.
 */
$(function () {
    $("#test").click(function () {
        var postData = {};
        $.ajax({
            type: 'POST',
            data: postData,
            url: '/index/test',
            dataType: 'json',
            success: function (data) {
                //    var data=JSON.parse(res)
                if (data.code != 1) {
                    alert(data.msg);
                    return;
                }
                console.log(data);
                alert("修改成功！");


            }
        })

    });    $("#loginOut").click(function () {
        var postData = {};
        $.ajax({
            type: 'POST',
            data: postData,
            url: '/login/logOut',
            dataType: 'json',
            success: function (data) {
                //    var data=JSON.parse(res)
                if (data.code != 1) {
                    alert(data.msg);
                    return;
                }
                console.log(data);
                alert("退出登录成功！");


            }
        })

    });

});